#include <stdio.h>
#include <stdlib.h>
#include "matrix.h"

int main()
{
	
	int n,m;
	
	printf("Enter the number of vectors and their dimensions:");
		scanf("%d %d", &n, &m);
	/*Vector u;
	float *array;
	array=(float *)malloc(8*m+8);
	u.elements=array;
	
	printf("Enter the Vector u:");
	for(int i=0;i<m;i++)
		scanf("%f",&u.elements[i]); 
	
*/

	printf("Enter the vectors\n");
	
	Vector vectors[n];
         
	for(int i=0;i<n;i++)
	{
		float *array;
		array=(float *)malloc(8*100);
		vectors[i].elements=array;
		for(int j=0;j<m;j++)
			scanf("%f", &vectors[i].elements[j]);

		vectors[i].dim=m;
	}
	
	
	int basis= dim_basis(vectors,n);
	printf("Rank is=%d\n", basis);
	if(basis!=n)
		printf("They are linearly dependent\n");
	else
		printf("They are linealry independent\n");
	
	
	
	
	

	
		
}
